use std::{net::TcpListener, io::Read, io::Write};

fn main() {
    let listener = TcpListener::bind("0.0.0.0:27015").expect("bind failed!");
    let (mut stream, _) = listener.accept().expect("accept failed!");
    let mut buf = Vec::new();
    let read_size = stream.read_to_end(&mut buf).expect("read failed!");
    println!("Bytes Received: {read_size}");
    let write_size = stream.write(&buf).expect("write failed!");
    println!("Bytes Sent: {write_size}");
}
